<#include "../common/_layout.html" />
<@layout>
    <div class="text-center">
        <h2>${userList?size} User(s) Online</h2>
        <span class="badge badge-info">${loginUserNum!0} logined and ${userList?size-loginUserNum} guests</span>
    </div>
    <div class="row">
        <table id="onlineuser" class="table table-striped table-condensed">
            <thead>
              <tr>
                <th>No.</th>
                <th>User</th>
                <th>Last Activity</th>
                <th>IP</th>
                <th>Agent</th>
                <th>URI</th>
              </tr>
            </thead>
            <tbody>
            <#if userList??>
            <#list userList as User>
            <tr>
                <td>${User_index+1}</td>
                <td><#if User.name??><a href="user/profile/${User.name}">${User.name}</a><#else>Guest</#if></td>
                <td>${User.time!}</td>
                <td>${User.ip_address!}</td>
                <td>${User.user_agent!}</td>
                <td><a href="${User.uri!}">${User.uri!}</a></td>
            </tr>
            </#list>
            </#if>
            </tbody>
        </table>
    </div>

    <link rel="stylesheet" href="assets/tablecloth/css/tablecloth.css">
    <script src="assets/tablecloth/js/jquery.metadata.js"></script>
    <script src="assets/tablecloth/js/jquery.tablesorter.min.js"></script>
    <script src="assets/tablecloth/js/jquery.tablecloth.js"></script>

    <script type="text/javascript" charset="utf-8">
      $(document).ready(function() {
                
        $("#onlineuser").tablecloth({
          theme:"stats",
          condensed:true,
          sortable:true,
          striped:true,
          clean:true
        });
    });
    </script>
    
</@layout>